<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title>我的</title>
	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<!--标准mui.css-->
	<link rel="stylesheet" href="../css/mui.min.css">
	<link rel="stylesheet" href="../css/iconfont.css" />
	<!--App自定义的css-->
	<link rel="stylesheet" type="text/css" href="../css/app.css"/>

	<style>


		.mui-popup-title{
			text-align: left;
		}

		.title{
			margin: 20px 15px 10px;
			color: #6d6d72;
			font-size: 15px;
		}
		body{
			background: #ffffff;
		}
		html,body{
			width: 100%;
			height: 100%;
			margin: 0;
			padding: 0;
		}
		.mui-content{
			width: 100%;
			height: calc(100% - 110px);
			position: absolute;
			top: 60px;
			margin: 0;
			padding: 0;
		}
		.oa-contact-cell.mui-table .mui-table-cell {
			padding: 11px 0;
			vertical-align: middle;
		}

		.oa-contact-cell {
			position: relative;
			margin: -11px 0;
		}

		.oa-contact-avatar {
			width: 75px;
		}
		.oa-contact-avatar img {
			border-radius: 50%;
		}
		.oa-contact-content {
			width: 100%;
		}
		.oa-contact-name {
			margin-right: 20px;
		}
		.oa-contact-name, oa-contact-position {
			float: left;
		}
		.mui-bar{
			background:#4F77AA ;
			color: #ffffff;
			-webkit-box-shadow: 0 0 1px rgba(0,0,0,0);
			box-shadow: 0 0 1px rgba(0,0,0,0);
		}
		.mui-title{
			color: #ffffff;
		}
		a{
			color:#ffffff;
		}
		.mui-content-title{
			width: 100%;
			height: 100px;
			background: #ffffff;
			color: #666666;
			padding: 15px;
			border-bottom: 8px solid #EFEFF4;
		}
		.mui-content-title .mui-content-title-left{
			width: 25%;
			text-align: center;
			height: 100%;
			float: left;
			position: relative;
		}
		.mui-content-title .mui-content-title-left .circle_bg {
			width: 60px;
			height: 60px;
			text-align: center;
			background: #4F77AA;
			border-radius: 50% 50%;
			position: absolute;
			top:50%;
			left:50%;
			transform:translate(-50%,-50%);
		}
		.mui-content-title .mui-content-title-left .circle_bg i{
			font-size: 40px;
			color: #ffffff;
			position: relative;
			top: 15px;
		}
		.mui-content-title .mui-content-title-center{
			width: 50%;
			height: 100%;
			text-align: center;
			float: left;
		}
		.mui-content-title .mui-content-title-right{
			width: 25%;
			height: 100%;
			text-align: center;
			float: left;
			position: relative;
		}
		.mui-content-title-right .cancell{
			font-size: 14px;
			width: 60px;
			height: 30px;
			text-align: center;
			line-height: 30px;
			border:1px solid #4F77AA;
			border-radius: 5px;
			position: absolute;
			top:50%;
			left:50%;
			transform:translate(-50%,-50%);
		}
		.mui-bar-bottom{
			background: #ffffff;
			-webkit-box-shadow: 0 0 1px rgba(0,0,0,0.1);
			box-shadow: 0 0 1px rgba(0,0,0,0.1);
		}
		.mui-content>.mui-table-view:first-child{
			margin-top: 0;
		}
		.clear{
			clear: both;
		}
		.color-primary{
			color: #1ab394;
		}
		.color-success {
			color: #1c84c6;
		}
		.color-info {
			color: #23c6c8;
		}
		.color-warning {
			color: #f8ac59;
		}
		.mui-table-view-cell:after{
			background: #ffffff;
		}
		.mui-table-view:after{
			background: #ffffff;
		}
		.mui-content ul li a span{
			padding-right: 15px;
			font-size: 24px;
			color:#4F77AA ;
		}
		.mui-content-title-center p{
			padding: 0;
			margin: 0;
			width: 100%;
			text-align: left;
			padding: 2px 0;
			padding-left: 15px;
		}
		.mui-content-title-center p.p_first{
			font-size: 14px;
		}
		.mui-content-title-center p.p_second{
			font-size: 12px;
		}
		.mui-content-title-center p.p_third{
			font-size: 12px;
		}
		/*.mui-content .fa{
            width: 25.7px;
            text-align: center;
        }*/
		* { touch-action: none; }
		span#openscan{
			display: inline-block;
			width:60px;
			height:60px;
			text-align: center;
			line-height:60px;
			font-size: 28px;
			border-radius: 50%;
			background: #4F77AA;
			color:#ffffff;
			position: absolute;
			top: -20px;
			right: 50%;
			margin-right: -30px;
		}
	</style>
</head>

<body>
<header class="mui-bar mui-bar-nav">
	<h1 class="mui-title">我的</h1>
</header>

<div class="mui-content">
	<div id="scroll" class="mui-scroll-wrapper">
		<div class="mui-scroll">
			<div class="mui-content-title">
				<div class="mui-content-title-left">
					<div class="circle_bg"><i class="icon iconfont icon-icon-"></i></div>
				</div>
				<div class="mui-content-title-center">
					<p class="p_first" id="p_realName"></p>
					<!-- 	<p class="p_second">网页端地址：</p>
                        <p class="p_third">http://www.baidu.com</p> -->
				</div>
				<div class="mui-content-title-right">
					<div class="cancell" onclick="toLogin()">退出</div>
				</div>
			</div>
			<ul class="mui-table-view">

				<li class="mui-table-view-cell" style="border-bottom: 8px solid #EFEFF4;">
					<a class="mui-navigate-right">
						<span class="icon iconfont icon-Group-"  style="font-size: 25px;position: relative;left: 3px;margin-right: 6px;"></span>密码修改
					</a>
				</li>

				<!-- 	<li class="mui-table-view-cell">
                        <a class="mui-navigate-right">
                            <span class="icon iconfont icon-Group-"></span>数据同步
                        </a>
                    </li>
                    <li class="mui-table-view-cell" style="border-bottom: 8px solid #EFEFF4;">
                        <a class="mui-navigate-right">
                            <span class="icon iconfont icon-Group-"></span>离线提交
                        </a>
                    </li>

                    <li class="mui-table-view-cell">
                        <a class="mui-navigate-right">
                            <span class="icon iconfont icon-Group-"></span>版本更新
                        </a>
                    </li>
                    <li class="mui-table-view-cell">
                        <a class="mui-navigate-right">
                            <span class="icon iconfont icon-Group-"></span>关于我们
                        </a>
                    </li> -->
			</ul>
		</div>
	</div>
</div>
<nav class="mui-bar mui-bar-tab mui-bar-bottom">
	<a class="mui-tab-item" href="../../index.html">
		<span class="mui-icon mui-icon-home"></span>
		<span class="mui-tab-label">首页</span>
	</a>
	<a class="mui-tab-item" href="equipment.html">
		<span class="mui-icon mui-icon-email fa fa-file-text-o" style="font-size: 20px;"></span>
		<span class="mui-tab-label">设备</span>
	</a>
	<p class="mui-tab-item">
		<span class="icon iconfont icon-saoyisao" id="openscan"></span>
	</p>
	<a class="mui-tab-item" href="spare_part.html">
		<span class="mui-icon mui-icon-gear"></span>
		<span class="mui-tab-label">备件</span>
	</a>
	<a class="mui-tab-item mui-active" href="my.html">
		<span class="mui-icon mui-icon-contact"></span>
		<span class="mui-tab-label">我的</span>
	</a>
</nav>

</body>

<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../html/js/jquery-1.11.3.js"></script>

<script src="../js/mui.min.js"></script>

<script>
	mui.init({
		swipeBack:true //启用右滑关闭功能
	});
	mui('body').on('tap','a',function(){
		window.top.location.href=this.href;
	});
	(function($) {
		$('#scroll').scroll({
			indicators: true //是否显示滚动条
		});

		$.init();

	})(mui);
	window.onload=function(){
		getRealName();
		var openscan=document.getElementById("openscan");
		openscan.onclick=function(){
			openScan();
		}
	}

	//打开
	function openScan(){

		var FNScanner = api.require('FNScanner');
		FNScanner.open({
			autorotation: true,
			sound:"widget://res/scan.wav"
		}, function(ret, err) {
			if (ret) {
				// alert(JSON.stringify(ret));
				if('success' == ret.eventType){
					var content=ret.content;
					if(content.indexOf("http://")==0 || content.indexOf("https://")==0 || content.indexOf("/sys")==0){
						// window.location.href=content;
						window.location.href="html/public/saoyisao.html?ret="+JSON.stringify(ret);
					}else{
						alert(content);
					}
				}

			} else {
				alert(err.msg);
			}
		});
	}
</script>
<script>

	//退出
	/**	function toLogin(){
			ar btnArray = ['否', '是'];
        	mui.confirm('您确定要退出登录吗？', '', btnArray, function(e) {
            	if (e.index == 1) {
					$.ajax({

						url : ctx+"/sys/login/exitLogin?time="+ new Date().getTime(),
						success : function(data) {
							var data = eval('(' + data + ')');
							if (data.msg > 0) {
								//window.location.href = '${ctx}/login.jsp'
								window.location.href="../../login.html";
							}
						}
				});

		}**/

	//测试--退出
	function toLogin(){
		window.location.href="login.html";

		// var btnArray = ['否', '是'];
		// mui.confirm('您确定要退出登录吗？', '', btnArray, function(e) {
		// 	if (e.index == 1) {
		//    	 // window.location.href="login.html";
		//
		//   //  info.innerText = '你刚确认MUI是个好框架';
		// 	}
		// 	})
		//
	}


	//用户真是名称
	function getRealName(){
		$.ajax({
			url : ctx+"/sys/layouts/baseInfoView/getRealName",
			success : function(data) {
				if (data!=null) {
					$("#p_realName").html("欢迎您! "+data);

				}else{
					$("#p_realName").html("欢迎您!  测试用户");
				}
			},
			error:function(){
				$("#p_realName").html("欢迎您!  测试用户");
			}
		});

	}
</script>
</body>


</html>